﻿namespace Whoot.UI
{
    [ProviderOrder(100)]
    public class UIKitProvider : IServiceProvider
    {
        public string ServiceName => UIConst.ServiceName;

        public static void Use()
        {
            Core.RegisterServiceProvider(new UIKitProvider());
        }
        public void OnInit()
        {
            UnityEngine.Debug.Log("UIKitProvider Init");
        }

        public void OnServiceRegister()
        {
            Core.BindSingletonService<IUIKit, UIManager>();
            
        }

        public void OnStart()
        {
            Core.Get<IUIKit>().Start();
        }

        public void OnQuit()
        {
            Core.Get<IUIKit>().Quit();
        }

        public void OnRestart()
        {
        }
    }
}